package org.nt4b.schemadoc.webgui.service;

import java.util.List;

import org.nt4b.schemadoc.core.dao.SchemaDocDAO;
import org.nt4b.schemadoc.core.dom.SchemaComments;
import org.nt4b.schemadoc.core.dom.Table;


public interface TransactionalCommentsService {
    
    /**
     * Loads and returns list of tables.
     * 
     * @param connectionConfiguration
     * @param schemaName
     * @return
     */
    List<Table> loadSchemaComments(final SchemaDocDAO dao, final String schemaName);
    
    /**
     * Loads and returns list of tables.
     * 
     * @param connectionConfiguration
     * @param schemaName
     * @return
     */
    List<Table> loadTableComments(final SchemaDocDAO dao, final String schemaName);
    
    /**
     * Loads and returns comments of a single table
     * 
     * @param connectionConfiguration
     * @return
     */
    Table loadColumnComments(final SchemaDocDAO dao, final String schemaName, final String tableName);
    
    /**
     * 
     * @param connectionConfiguration
     * @param schemaComments
     */
    void saveSchemaComments(final SchemaDocDAO dao, final SchemaComments schemaComments);
    
    /**
     * This function will be used by saving table and column comments
     * 
     * @param dao
     * @param tables
     */
    public void saveTableComments(final SchemaDocDAO dao, final List<Table> tables);
    
}